<template>
	<navigator :url="'/pages/detail/detail?_id='+likeItem._id">
		<view class="container">
			<image :src="likeItem.coverpic ||coverpic "></image>
			<text>{{likeItem.name}}</text>
			<view class="bottom">
				<view class="box">
					<text>{{likeItem.pageview}}.0万</text>
					<image src="../../static/image/index/like/mengbanzu278.png"></image>
				</view>
				<view class="box">
					<text>{{Math.abs(likeItem.collections)}}</text>
					<image src="../../static/image/index/like/mengbanzu279(1).png"></image>
				</view>
			</view>
		</view>
	</navigator>
</template>

<script>
	export default {
		name: "homeLike",
		props: ['likeItem'],
		data() {
			return {
				coverpic: "https://woniumd.oss-cn-hangzhou.aliyuncs.com/web/xuchaobo/20210830150513.jpg"
			};
		},
		created() {
			// collections: 9
			// coverpic: "https://woniumd.oss-cn-hangzhou.aliyuncs.com/web/xuchaobo/20210830150513.jpg"
			// isFree: "Y"
			// name: "小面包"
			// pageview: 253
			// _id: "601fa488882000007800670e"
			// console.log(this.likeItem);
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 334rpx;
		height: 332rpx;
		margin-bottom: 38rpx;

		>image {
			width: 334rpx;
			height: 248rpx;
			border-radius: 8rpx;
			margin-bottom: 8rpx;
		}

		>text {
			font-size: 30rpx;
			font-weight: bold;
			color: #515151;
		}

		.bottom {
			display: flex;

			.box {
				margin-right: 58rpx;

				text {
					font-size: 22rpx;
					margin-right: 10rpx;
					color: #aaa;

				}

				image {
					width: 28rpx;
					height: 22rpx;
				}
			}
		}
	}
</style>
